﻿/**
* 直线线条。
*/
Ext.define('Happy.designer.StraightLine', {
    extend: 'Happy.designer.Line',

    /**
     * @inheritdoc
     */
    createLinePath: function (config) {
        var util = Happy.designer.PointUtil;

        return util.createLinePath([config.start, config.end]);
    },

    /**
     * @inheritdoc
     */
    createArrawPath: function (config) {
        var util = Happy.designer.PointUtil;

        var angle = util.angle(config.start, config.end);

        var points = util.createArrawPoints(config.end, angle, 8);

        return util.createLinePath(points);
    }
});